package jxerializeml.examples.game_config.beans;

import jxerializeml.clues.fields.InvokeSetter;
import jxerializeml.clues.fields.SetComment;

public class ConfigurationGraphicsBean {
	@InvokeSetter()
	@SetComment(description = "Value in the range 640 through 1280.")
	private int windowWidth = 1024;
	
	@InvokeSetter() 
	@SetComment(description = "Value in the range 480 through 1024.")
	private int windowHeight = 768;
	
	@SetComment(description = "Allowed values are CLASSICAL, FUTURISTIC and HISTORICAL.")
	private GraphicsTexturePacks texturePack = GraphicsTexturePacks.CLASSICAL;
	
	public void setWindowWidth(int width) {
		if (width < 0) {
			width = 640;
		}
		else
		if (width > 1280) {
			width = 1280;
		}
		
		this.windowWidth = width;
	}
	
	public void setWindowHeight(int height) {
		if (height < 480) {
			height = 480;
		}
		else
		if (height > 1024) {
			height = 1024;
		}
		
		this.windowHeight = height;
	}
	
	public int getWindowWidth() {
		return this.windowWidth;
	}
	
	public int getWindowHeight() {
		return this.windowHeight;
	}
	
	public GraphicsTexturePacks getTexturePack() {
		return this.texturePack;
	}
}
